package com.btpj.jetpack.arouter.treedetail

import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Autowired
import com.alibaba.android.arouter.launcher.ARouter
import com.btpj.jetpack.arouter.ConstantsPath

class TreeDetailServiceImpWrap private constructor() {

    @Autowired(name = ConstantsPath.TREE_DETAIL_SERVICE_PATH)
    lateinit var service: TreeDetailService

    init {
        ARouter.getInstance().inject(this)
    }

    companion object {

        val instance: TreeDetailServiceImpWrap by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
            TreeDetailServiceImpWrap()
        }
    }


    fun start(context: Context, cid: Int, title: String) {
        service.start(context, cid, title)
    }

}